<?php

class Hq extends Controller{
	
	function __construct(){
		parent::Controller();
		$this->load->model('login_model');
		$this->load->model('hq_model');
	}
	
	function index(){
		//Login Data
		$gebruiker['users_naam'] = $this->session->userdata('username');
		$gebruiker['users_id'] = $this->login_model->getUserID($gebruiker);
		$ingelogd = $this->login_model->is_ingelogd();
		
		//Variabelen
		$data['titel'] = "Hoofdkwartier";
		$data['query'] = $this->login_model->getUserInfo($gebruiker);
			
		if($ingelogd){
			$this->load->view('hq_view',$data);
		}
		else{
			redirect('login');
		}
	}
}

?>